package com.myinternet.lutu.controller;

import com.myinternet.lutu.modal.LessJsonResult;
import com.myinternet.lutu.modal.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController //spring-boot方式，返回一个json字符集
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/getUserInfo")
    public LessJsonResult user() {
        User user = new User();
        user.setAge(31);
        user.setBirthday(new Date());
        user.setName("saiys111");
        user.setPassword("123445");
        return LessJsonResult.ok(user);
    }
}
